﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //HTTP的Get方法
        LbQueryString.Text = "limit:"+Request.QueryString["limit"] +",page:"+Request.QueryString["page"];

        //HTTP的Post方法
        LbForm.Text = Request.Form["TbUsername"];
        LbForm2.Text = Request.Form["username"]+","+Request["submit"];
        // Server Variables
        foreach(var item in Request.ServerVariables.Keys)
        {
            LbServerVariables.Text += "Key:" + item + "<br>";
        }
        LbServerVariables.Text += "服务器地址：" + Request.ServerVariables["LOCAL_ADDR"] +"<br>";
        LbServerVariables.Text += "服务器端口："+ Request.ServerVariables["SERVER_PORT"] + "<br>";
        LbServerVariables.Text += "客户端地址：" + Request.ServerVariables["REMOTE_ADDR"] + "<br>";
        LbServerVariables.Text += "客户端端口：" + Request.ServerVariables["REMOTE_PORT"] + "<br>";

        // Browser
        LbBrowser.Text = "浏览器类型" + Request.Browser["Browser"] + ",浏览器的版本号" + Request.Browser.Version;

        Response.Write(Request.UserAgent + "<br>");
        Response.Write(Request.Cookies.Keys.Count+ "<br><br>");

    }
}